package gr.handmademarket.po.implementations;

import java.io.Serializable;

public class PurchaseItem
implements Serializable
{

	/**
	 * serialVersionUID.
	 */
	private static final long serialVersionUID = 1L;

	private int quantity = 1;
	
	private Product product;

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof PurchaseItem)){
			return false;
		}
		PurchaseItem p = (PurchaseItem) obj;
		return this.getProduct().equals(p.getProduct());
	}
	
}
